 var reader = new FileReader();
// 通过四种方式读取文件
reader.readAsBinaryString(file);   
reader.onload = function(){
    //查看文件输出内容
    console.log(this.result);
    //查看文件内容字节大小
    console.log(new Blob([this.result]))
}



fetch(file).then(function(response) {
  if(response.ok) {
    return response.blob();
  }
  throw new Error('Network response was not ok.');
}).then(function(myBlob) { 
  var objectURL = URL.createObjectURL(objectURL); 
  //myImage.src = objectURL;
 // x=  reader.readAsBinaryString(objectURL); 
  console.log(objectURL)
  //console.log(x)
}).catch(function(error) {
  console.log('There has been a problem with your fetch operation: ', error.message);
});


fetch(file).then(function(response) {
  if(response.ok) {
    return response.blob();
  }
  throw new Error('Network response was not ok.');
}).then(function(myBlob) { 
  var objectURL = URL.createObjectURL(myBlob); 
  //myImage.src = objectURL;
  x=reader.readAsBinaryString(myBlob)
  console.log(objectURL)
  console.log(x)
}).catch(function(error) {
  console.log('There has been a problem with your fetch operation: ', error.message);
});